<?php
/**
 * Created by PhpStorm.
 * User: 40323
 * Date: 2017-09-12
 * Time: 19:53
 */

namespace app\index\model;


use think\Model;

class Profile extends Model
{
    // 类型转换
    protected $type = [
        'birthday' =>'timestamp:Y-m-d',
    ];

    // 关联操作
    protected  function user()
    {
        // 档案 BELONGS TO 关联用户
        return $this->belongsTo('User');
    }
}